System and method for automatically producing haptic events from a digital audio signal

ABSTRACT

The system and method described is directed to receiving digital audio files and automatically converting the received files into haptic events. In an embodiment, the received files are of sampled digital or digitized analog audio files. The system and method separates the audio signal into a plurality of sub-band signals and segments the sub-band signals into a plurality of events. The system and method then assigns haptic effects to the events to produce haptic event signals which are to be output by an actuator. The system and method utilizes clipping and minimum time separation parameters along with physical parameters of the actuator and frequency characteristics in the audio signal to analyze and provide discrete haptic events which correspond with the audio.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation application of U.S.application Ser. No. 11/515,146 (incorporated by reference herein),filed Aug. 31, 2006 which claims the benefit of priority based on U.S.Provisional Patent Application Ser. No. 60/792,137 (incorporated byreference herein), filed on Apr. 13, 2006, in the name of inventorsStephen D. Rank and Christopher J. Ullrich, entitled “Music to HapticCode Conversion,” commonly owned herewith.

FIELD

The subject matter described herein relates generally to the field ofhaptics, and more particularly to generating a haptic effect controlsignal or haptic track corresponding to a digital audio or audio/visualfile

BACKGROUND

Tactile vibrations are often desirable in a user interface device. Touchunifies the spatial senses; those you use to navigate your way throughthe world—sight, sound, and touch. Touch produces reflex-rate responsein milliseconds (ms) and supplies a completeness that sight and soundtogether can't replace. In a user interface device, it is useful to havetactile vibrations match sound such as when a music file is played on acell phone. Audio for end-user devices may be encoded in two basic ways:in a structured representational format, such as a protocol whichsymbolically encodes the sounds to be played into a string of knownsymbols (e.g. Musical Instrument Digital Interface or “MIDI”); and asdigital sampled audio, which is a set of periodic samples of the audiowaveform. Currently, sampled audio files can be converted through manualconversion. A human designer listens, analyzes, and judges the sampledaudio file and selects features of the sampled audio from which tocreate haptic effects. However, human design intervention is aconstrained resource. What is needed is a fully-automated orsemi-automated method of converting music files into haptic effects.

SUMMARY

In an embodiment, a method for manipulating a digital audio signalcomprises separating the audio signal into a plurality of sub-bandsignals, segmenting at least one of the sub-band signals into aplurality of events; and assigning a haptic effect to at least one ofthe events to produce a haptic event to be output by an actuator. In anembodiment, an apparatus for manipulating a digital audio signalcomprises a circuit for separating the audio signal into a plurality ofsub-band signals; a circuit for segmenting at least one of the sub-bandsignals into a plurality of events; a circuit for assigning a hapticeffect to at least one of the events to produce a haptic event; and anactuator configured to output the haptic event. In an embodiment, anapparatus for manipulating a digital audio signal comprising: means forseparating the audio signal into a plurality of sub-band signals; meansfor segmenting at least one of the sub-band signals into a plurality ofevents; and means for assigning a haptic effect to at least one of theevents to produce a haptic event to be output by an actuator. In anembodiment, the system and method computes a spectral decomposition ofthe audio signal. In an embodiment, the system and method designates aminimum separation time between events. In an embodiment, the system andmethod designates a minimum actuator start-up time prior to a firsthaptic event. In an embodiment, the system and method designates aminimum duration of time for each haptic event in a plurality of hapticevents. In an embodiment, the system and method designates a minimumseparation time between events. In an embodiment, the system and methoddesignates a minimum actuator start-up time prior to a first hapticevent. In an embodiment, the events within the sub-band signalcorrespond to a user specified average number of haptic effects persecond. In an embodiment, the events within the sub-band signal have analias value below a maximum alias target value. In an embodiment, thesystem and method calculates an average over a designated period of timefor a parameter of one or more sub-band signals. In an embodiment, thesystem and method designates an event if a short term value of theparameter of the sub-band signal exceeds a multiple of the average forthe parameter. In an embodiment, the system and method computes a powerspectrum of the spectral decomposition of the audio signal; selects afrequency based at least in part on the power spectrum; and identifiesan event based at least in part upon the selected frequency. In anembodiment, the system and method stores the haptic event on a servercapable of being in communication with a client over a network, whereinthe server delivers the haptic event to the client.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated into and constitute apart of this specification, illustrate one or more embodiments of thepresent invention and, together with the detailed description, serve toexplain the principles and implementations of the invention

FIG. 1 is a portion of a musical piece represented in a visuallyperceivable manner using a traditional sheet music style comprising asequence of notes, chords and rests.

FIG. 2 is a time-amplitude graph of a portion of a sampled audio signal.

FIG. 3 is a process flow diagram illustrating a method for haptic effectmapping in accordance with an embodiment.

FIG. 4 is an overall architecture diagram of the system piece inaccordance with an embodiment.

FIG. 5 is a filtered time-amplitude graph showing high-frequency andmedium-frequency sub-band signals for the musical piece of FIG. 4 inaccordance with an embodiment.

FIG. 6 is a normalized time-signal graph showing a representation ofaverage power and instantaneous power used to segment themedium-frequency sub-band signal in accordance with an embodiment.

FIG. 7 is a frequency-power graph used to segment the low-frequencysub-band signal in accordance with an embodiment.

FIG. 8 is a time-symbol representation of a sequence of haptic effectsfor the FIG. 4 musical piece example in accordance with an embodiment.

FIG. 9 is a time-note representation of a series of MIDI events makingup a musical piece in accordance with an embodiment.

FIG. 10 is an alternative time-instrument-note representation of aseries of MIDI events making up a musical piece in accordance with anembodiment.

FIGS. 11A, 11B and 11C together constitute a process flow diagramillustrating a method for MIDI sequence processing to yield acorresponding sequence of haptic effects in accordance with anembodiment.

DETAILED DESCRIPTION

Embodiments of the subject matter are described herein in the context ofa system for automatic audio to haptics conversion. Those of ordinaryskill in the art will realize that the following detailed description ofthe present invention is illustrative only and is not intended to be inany way limiting. Other embodiments of the present invention willreadily suggest themselves to such skilled persons having the benefit ofthis disclosure. Reference will now be made in detail to implementationsof the present invention as illustrated in the accompanying drawings.The same reference indicators will be used throughout the drawings andthe following detailed description to refer to the same or like parts.

In the interest of clarity, not all of the routine features of theimplementations described herein are shown and described. It will, ofcourse, be appreciated that in the development of any such actualimplementation, numerous implementation-specific decisions must be madein order to achieve the developer's specific goals, such as compliancewith application- and business-related constraints, and that thesespecific goals will vary from one implementation to another and from onedeveloper to another. Moreover, it will be appreciated that such adevelopment effort might be complex and time-consuming, but wouldnevertheless be a routine undertaking of engineering for those ofordinary skill in the art having the benefit of this disclosure.

In accordance with the subject matter described herein, the components,systems, devices, process steps, and/or data structures may bemanufactured, operated and/or implemented using various types ofoperating systems, computing platforms, computer programs, and/orgeneral purpose machines. In addition, those of ordinary skill in theart will recognize that devices of a less general purpose nature, suchas hardwired devices, field programmable gate arrays (FPGAs),application specific integrated circuits (ASICs), or the like, may alsobe used without departing from the scope and spirit of the inventiveconcepts disclosed herein. Where a method comprising is implemented by acomputer, device or a machine and the method may be stored asinstructions readable by the machine, they may be stored on a tangiblemedium such as a computer memory device, including, but not limited to,ROM (Read Only Memory), PROM (Programmable Read Only Memory), EEPROM(Electrically Eraseable Programmable Read Only Memory, FLASH Memory,Jump Drive, and the like), magnetic storage medium (e.g., tape, magneticdisk drive, and the like), optical storage medium (e.g., CD-ROM,DVD-ROM, paper card and paper tape, and the like) and other known typesof program memory. In addition it should be recognized that the methodcould be executed by a human operator using a selection of softwaretools without requiring human or creative judgment.

The system and method described herein is directed to receiving digitalfiles and automatically converting the files into haptic events. In anembodiment, the received files are of sampled digital or digitizedanalog audio files. In another embodiment, the received files arestructured representation files (e.g. MIDI files). It should be notedthat although MIDI files are described herein in terms of structuredrepresentation files, any other protocol may be used by the system,whereby the protocol utilizes structured representation files which maybe output audio, video or other signals. The converted haptic events areprocessed and output by an end-device in which the user experiences apleasing haptic experience which corresponds with the audio output bythe end-device and/or another device. The end-device includes, but isnot limited to, audio players, mobile phones, video players, PDAs,computers, televisions, video game consoles, computer peripherals (e.g.mouse, joystick, roller ball, keyboard), steering wheels, furniture,sliders, knobs, headphones, touchscreens, portable or non-portableradios, one-way/two-way pagers and other appropriate user manipulatabledevices

It should also be noted that although the system and method is describedherein to be output by an end-device, a plurality of end-devices maysimultaneously or at varying times output the same haptic events and/ordifferent portions of the same haptic events in accordance with anembodiment. It should be noted that the end device may include one ormore actuators therein. In an embodiment of multiple actuators in theend device, haptic events to be output by the multiple actuators may bedone simultaneously, selectively, alternately, and/or individually foreach haptic event.

FIG. 4 illustrates an overall architecture embodying the system inaccordance with an embodiment. As shown in FIG. 4, a variety of sourcesmay provide the input signal 99 to the system 300. For example, thedigital sampled audio signal or structured representation signal may bereceived from a server 402, audio signal source (CD, DVD, DAT, etc.),host computer 406, mobile device 408 and/or commercial kiosk 410. Theinput signal is sent over a wired or wireless private or public network98 to a receiving module 412 of the system 300. The signal is thenprocessed by processor 414 as discussed in more detail below. Onceprocessed, the system 300 outputs the haptic event sequence by hard-wireor wirelessly through port 416 to one or more end devices 420. The enddevice 420, upon receiving the output file having the haptic eventsequence (with or without accompanying audio) is then capable ofoutputting the haptic events using one or more actuators 422 along withan optional audio speaker 424. It should be noted that the architecturedescribed in FIG. 4 is an embodiment, whereby additionally and/oralternative components may be utilized without departing from the scopeof the subject matter described herein.

Turning now to the figures, FIG. 1 illustrates a portion 100 of amusical piece represented in a visually perceivable manner using atraditional sheet music style comprising a sequence of notes, chords andrests. The musical piece may be played and recorded, for example, in adigital sampled form or in a structured representation form. Eachmusical note represents a frequency of mechanical vibration. The typesof notes (i.e. A, A#, B, C, C#, D, D#, E, F, F#, G, G#) are differentfrom one another in terms of pitch. Whole notes, half notes, quarternotes, eighth notes, sixteenth notes, and the like, represent theduration of play for each note or frequency. Likewise, whole rests, halfrests, quarter rests, eighth rests, sixteenth rests, and the like,represent durations of time in which no note is played. The sequence ofthe notes and their duration determine the representation of whichfrequencies will be played at which times.

An embodiment of the present invention is directed to automaticallymapping haptic events to a digital sampled audio file. Sampled audiosources (and files), which have, but are not limited to, WAV, MP3, MP4,ACC, ASX, WMA formats, all provide essentially the same type ofinformation, such as a sample rate and a set (often left and rightchannels) of time ordered samples. However, unlike structuredrepresentation files, no explicit information about instruments, pitch,tempo or other musical context is available from a sampled source—onlythe fully rendered sounds are available. A time-amplitude graph of anexample sampled audio signal is shown in FIG. 2.

Additionally, or alternatively, the system is capable of automaticallymapping haptic events from a structured representational signal. Inparticular, given a particular structured representation of an audiofile, the system is able automatically map the haptic events byanalyzing the data inherently provided by the structuredrepresentational signal. However, automatically mapping either type offile, the input signal is carefully processed and analysis is simplifieddue to the performance limitations of the actuators in the end-device toprovide the pleasing distinct haptic sequences from the audio signals inthe file.

Current haptic technology is capable of playing up to about foursimultaneous haptic events and operating with about a 1 ms control loop.This is due to the limitations of existing actuators. Given thelimitations of existing Eccentric Rotating Mass (ERM) motor technology,playing simultaneous haptic effects can result in unexpected actuatorbehavior. Also ERM motors have relatively low mechanical bandwidthswhich limit the haptic event frequency to a maximum of about 4 hapticevents per second. ERM motors also have a startup delay of about 50-80ms before peak acceleration is achieved and this startup delay must betaken into account in creating haptic control signals to drive such ERMmotors. Although ERM motors are described in the context of thedescribed subject matter herein, it is contemplated that other types ofmotors or actuators may be used depending on the type of end-device,haptic effect resolution, digital quality of the to-be-converted audio,and application of use. For example only, the actuator may be a linearresonant actuator (LRA) which has resolution capabilities superior toERM motors. Other types of actuators are contemplated including, but notlimited to linear current control motors, stepper motors, magneticactuators, pneumatic/hydraulic active actuators, torquers (motor withlimited angular range), and voice coil actuators.

To provide a pleasing haptic experience to the user in contact with thehaptically enabled end-device, the system should not generate hapticevents that are too numerous within a period of time. In addition, thehaptic events should be spaced far enough apart not to produce oneconstant vibration or “blur”, but nonetheless be consistent with thesound effects, musical tempo and/or melodies. Exceptional events, suchas a change of key, melodic transitions, and the like, should often behighlighted by the haptic event. The musical rhythm should often beaccented by identifying the tempo of the audio program signal and thephase offset of that tempo relative to the beginning of the audioprogram signal. Audio events which have a substantial amount of silencebeforehand may also be likely haptic events due to their accent in themusic (e.g. cymbals, car crashing as a sound effect).

FIG. 3 is a process block diagram illustrating a system and method forhaptic effect mapping of a received digitized sampled audio signal inaccordance with an embodiment. In general, according to an embodiment,the received sampled audio input is received and automatically“converted” or “mapped” by the system to form a haptic control signal orhaptic event which controls the playback of haptic effects in the enddevice to be in synchrony with the playback of identified audio eventsin the signal. The blocks in FIG. 3 are designated as generic componentswhich may be analog or digital hardware, including but not limited to,hardwired circuits, Integrated Circuits and ASICs. Additionally oralternatively, the blocks in FIG. 3 are software code components such asroutines, subroutines, code, threads and the like embodied in orutilized by processors and memories.

In accordance with the embodiment in FIG. 3, the received sampled audiosignal is loaded into memory of a computational device in block 310. Thecomputational device may be a conventional personal computer, aprocessing module, server, client, the end-device itself defined above,or any other electronic device having sufficient processingcapabilities. The sampled audio signal may be taken from a compact disc(CD), mini-disc, DVD, DAT, hard-drive or other media. In an embodiment,the audio signal may be downloaded directly (wired or wirelessly) from acommercial or non-commercial website which is then converted andplayable by the end-device. In another embodiment, audio tracks areconverted remotely and then stored on a server, whereby the convertedhaptic tracks are able to be downloaded directly from the server to oneor more end-devices to be played. In an embodiment, the received file isprocessed by the system off-line, whereby the system processes a portionor the entire file after it has been received. In an embodiment, thereceived file is processed by the system in a real time manner, wherebythe system processes and outputs the data as the file is being received.

The received file may be input into a file reader/player which includedin a commercial computer software program such as Microsoft WindowsMedia Player®, RealPlayer®, iTunes®, MusicMatch Jukebox®, or otherproprietary program on a server and/or end-device. Alternatively, anycodec (encoder-decoder) that generates PCM type output may be used inconjunction with the system.

In an embodiment, the system receives the sampled audio as a single(monaural) input signal. In an embodiment, the system receives thesampled audio as stereo or multi-channel inputs which may be convertedor mapped by pre-mixing or sub-selecting, for example. Additionally,multiple haptic tracks could be processed simultaneously or at differenttimes, if desired.

After the input signal is loaded into an optional memory of the systemin an embodiment. The system retrieves the signal from the memory andanalyzes the input signal in terms of its energy content per time andfrequency in block 312. In an embodiment, the system uses a windowedFast Fourier Transform (FFT) algorithm to produce energy distributiondata of the audio signal in block 312. In an embodiment, any anotherappropriate procedure or algorithm, including but not limited to wavelettransform, is utilized to produce energy distribution information of thesignal. The spectral decomposition analysis may also produce phaseinformation encoded as complex coefficients which may be utilized by thesystem in processing the signal.

In an embodiment, the system utilizes a compensation factor to thespectral decomposition calculations to account for the Human Eartransfer function and perceptual factors prior to segmentation of thefrequency sub-bands. For instance, the human ear is more sensitive tosounds at 3-4 kHz as opposed to sounds at 60 Hz. In an example, thesystem will attenuate frequency content around 60 Hz by approximately 40dB whereas content at frequencies between 3 kHz and 4 kHz is notattenuated. Therefore, even though there may be significantly moreenergy in a 60 Hz beat, the user will likely perceive a beat in a higherfrequency band as more prominent due to the attenuation.

Similarly, the audio transfer function of the speakers for the targethaptic device can be taken into consideration and applied to thespectral decomposition prior to segmentation. For example, the frequencyresponse on most cell phone speakers is such that frequencies below 200Hz are not transmitted. Therefore, emphasizing a beat under 200 Hz mightyield unexpected haptic effects when accompanying the audio signalrendered by such speakers. Ignoring these frequency bands in thespectral decomposition in processing may give more consistent results.

In an embodiment, the system utilizes the absolute value of the complexcoefficients from the spectral decomposition analysis to map the energydistribution of the audio signal in terms of frequency to allow thedesignation of sub-band signals and crossover frequencies of the audiosignal. This is designated in block 314 in FIG. 3.

As shown in FIG. 3, the system and method determines a number ofsub-band frequencies from the energy distribution of the input audiosignal at block 314. As stated above, the system may perform thisanalysis using software, analog or digital hardware and/or firmware. Inan embodiment, the system analyzes the energy distribution of the signaland designates the energy into three sub-band categories based onfrequencies. In an embodiment, the sub-band categories are highfrequency sub-bands, medium frequency sub-bands, and low frequencysub-bands. FIG. 5 illustrates an example filtered time-frequency graphshowing the high-frequency sub-band signal 500 and the medium-frequencysub-band signal 502 of the input audio signal. In an embodiment, thesystem and method designates the energy distribution of the input audiosignal into to more or less than three sub-band categories.

In an embodiment, the low-frequency sub-band is designated by the systemto be within a range of low frequency values, whereas the high-frequencysub-band is designated to be within a range of high frequency values.The system designates a medium-frequency sub-band to be between thehighest frequency in the low sub-band and the lowest frequency in thehigh sub-band. It should be noted that each of the frequency sub-bandranges are not limited to those discussed, and each sub-band can bedesignated to have any upper and lower frequency limits based on thedesire of the designer. In an embodiment, the low, medium and highfrequency ranges are determined by the system based on a global averageof a power spectrum of the entire signal or segmented portions of theentire signal. It is contemplated that the low, medium and highfrequency ranges may be determined by the system utilizing any otherappropriate methods.

In particular, the system and method analyzes the input audio signal interms of sub-band crossover frequencies. In an embodiment, the systemcalculates one or more sub-band crossover frequencies f_(m) between thelow-frequency sub-band and the medium-frequency sub-band. Additionally,the system and method calculates one or more sub-band crossoverfrequencies f_(h) between the medium-frequency sub-band and thehigh-frequency sub-band. In an example, f_(m) is designated to be in arange of approximately 300 Hz to approximately 1000 Hz. In an example,f_(h) is designated in a range of approximately 3500 Hz to approximately5000 Hz. It should be noted that these ranges are only examples and thatother frequency ranges are contemplated within the scope of the systemand method.

In an embodiment, the f_(m) and the f_(h) frequencies are computed asthe mean values of the 15^(th) and 85^(th) percentile spectral rolloffin which the spectral rolloff is the frequency below which a specifiedpercentage of the total energy of the audio input signal can be found.These specified percentages may be computed from the energy distributionof the signal calculated in block 312. It should be noted that otherspectral roll off percentiles are contemplated and are not necessarilylimited to the 15^(th) and 85^(th) percentile. In an embodiment, thesystem and method normalizes the energy for designated frequencies ineach time window and calculates the cumulative value that corresponds tothe specified percentile. It should be noted that this is one method ofcalculating the cross-over frequencies and other methods of calculatingthe cross-over frequencies are contemplated. For example, in anembodiment, the sub-band signal crossover frequencies may be computed bycalculating the FFT of the entire signal and calculating the rolloffvalues. Three sub-band signals may then be constructed from the energydistribution (e.g. spectrogram) of the input audio signal by summing theenergy values in each sub-band. This procedure may also serve todown-sample the input signal since the 44 KHz time information (theoriginal audio sample rate) may be converted to 128 Hz time data duringthe spectral decomposition computation.

In an embodiment, the high-medium- and low-frequency sub-band signalsare each segmented and are processed by the system. As shown in FIG. 3,the medium frequency sub-band signal is sent to a medium band optimizer,designated by block 316. The medium band optimizer 316 generates a trackof discrete events corresponding to a desired number of effects persecond (EPS). In an embodiment, the targeted EPS are defined by theuser, although the EPS may be defined based on certain factors,including, but not limited to, resolution of the actuator, type ofmusic, type of end-device, and processing capabilities of the system orthe user's desire.

The system enforces a minimum separation between haptic events to permitthe actuator in the end-device an appropriate time to start up and winddown for each haptic effect that it outputs. This minimum separationallows the actuator in the end-device to produce discrete multiplehaptic events and prevents two or more haptic events from overlapping orproducing a “blurred” feeling of portions of multiple haptic effectsoverlapping each other. In an embodiment, the amount of time limitedbetween the haptic events is 50 ms, and the specified duration isbetween 100-250 ms, depending on the sub-band. It should be noted thatthe system is not limited to these values and other values arecontemplated

The medium band optimizer 316 attempts to capture the melody of vocalevents by generating the track of discrete haptic events to correspondto the vocal melody in the audio input signal. The system thus utilizesthe clipping parameter to identify the events with the highest amount ofenergy within the target range of the desired EPS.

Upon the clipped input signal being output from the medium bandoptimizer 316, the signal is input into a local segmenter 318, as shownin FIG. 3. In general, the local segmenter 318 utilizes an algorithmwhich compares a long time-average of the clipped input signal with ashort-time value of the clipped input signal to segment the mediumfrequency sub-band signal into a series of start and end times for eachevent. As shown by the arrow in FIG. 3, the local segmenter 318 thenprovides this information back to the optimizer 316, whereby theoptimizer 316 applies a one-dimensional line search to monotonicallyadjust one or more clipping parameters until the segmentation ofdiscrete events is in the target range of the desired EPS. In anembodiment, this process is repeated until the desired number of EPS isreached for the signal. In an embodiment, the segmentation process isrepeated for a pre-set number of iterations. The particulars of thesegmentation process will now be discussed.

FIG. 6 illustrates a time-signal graph showing a representation ofaverage power and short-time power used to segment the medium frequencysub-band signal into the discrete haptic events in accordance with anembodiment. The graph of FIG. 6 illustrates the time-average 600 of themedium frequency sub-band signal as well as the short-time signal values602 within a 20 second window. It should be noted that other timeduration windows may be utilized by the system.

The short-time signal value, in an embodiment, may be obtained bylow-pass filtering the input audio signal through a 5 Hz Butterworthfilter. It should be noted that the input signal is filtered utilizingany other device or method in either the analog or digital domains. Inan embodiment, the system creates a new event at a certain time wherethe short-time average value signal exceeds a specified threshold forthat point in time. In terms of the graph of FIG. 6, the event beginsand ends at the points where the short time average values cross thelong time average in a desired direction (e.g. upwardly or downwardly).For example, in FIG. 6, the local segmenter 318 determines where anevent begins (point 604) by identifying where the short time average 602crosses the long term average line 600 in an upward direction. The localsegmenter 318 may also determine where the event ends by identifyingwhere the short time average 602 crosses the long term average line 600in a downward direction (point 606). It should be noted that the aboveis only an example of a segmentation process and it is apparent thatother segmentation processes and algorithms may be used by the system.

For low and high frequencies, it is common for there to be more eventsthat qualify as haptic events than the actuator in the end-device caneffectively produce per second. The optimization process discussed abovein regards to medium frequency sub-bands are not preferred for higherand lower frequency sub-bands due to the large number of closely spacedfrequency peaks which are usually inherent in high and low frequencysub-bands (FIG. 5). These large number of closely spaced frequency peaksmay cause the actuator to produce aliased results inconsistent with thetempo of the input audio signal.

To address this issue, the system utilizes a different optimization andsegmentation approach for signals in the high and low frequencysub-bands than that of the medium frequency sub-bands. FIG. 3illustrates that the high and low frequency sub-bands are processeddifferently by the system. In regards to the high frequency sub-band,aliasing is a concern which the system takes into account whenprocessing the signal. Thus, haptic events generated withoutconsideration for this aliasing may follow a beat or rhythm that isinconsistent with the music.

In general, as shown in FIG. 3, the system includes a high frequencyoptimizer 320 block which performs a one-dimensional (1-D) line searchto adjust one or more clipping parameters on the high frequency signals.The optimizer block 320 uses a measure of the amount of aliasing in theoutput signal and adjusts the clipping value which is then provided tothe segmenter block 322. The high sub-band segmenter 322 determines thestart and/or end times of each haptic event and provides the result backto the optimizer block 320 as shown by the arrow. The optimizer 320 thenadjusts the clipping value in response until the targeted alias level isreached or a certain number of pre-defined steps have occurred.

Aliasing is measured by examining the distribution of differencesbetween the start times of generated haptic events. If this distributionhas a very large peak at the same delta as the minimum effect separationdictated by the actuator, the segmentation result is considered to havehigh aliasing. A reasonable target alias value might be 30%, which meansthat 30% of the effects have start times that differ by exactly theminimum separation value

The algorithm used in the Segment block 322 may be the same as that usedby the medium sub-band 320 in an embodiment. In an embodiment, thealgorithm used to process high frequency sub-band signals by block 322is similar to the algorithm performed by the block 318 formedium-frequency sub-band signals, but with several differences. In anembodiment, the long time average is 50 ms for high frequency signals.

In an embodiment, the input signal is pre-processed to increase thesignal to noise ratio (S/N). The S/N may be computed to be the ratio ofthe mean of the clipped signal to the maximum value of the signal,whereby the processed signal is computed by subtracting the scaled 1.5second moving average from the input signal and setting negative valuesto zero. It should be noted that this is only an example, and the systemis able to utilize another method to improve the signal to noise ratioin the signal.

In an embodiment, the haptic effects which are measured to be longerthan 250 ms are clipped to a maximum of 250 ms for high frequencysignals. In an embodiment, new segments are produced only if the clippedsignal is greater than the highest peak in the most recent 50 ms window.It should be noted that the above are examples and are not limited tothose factors described above. It should also be noted that one or moreof the above factors may be utilized in performing the algorithm. Theresult of the high-frequency sub-band segmentation is typically a set ofshort haptic events that roughly correspond to the tempo of the inputaudio signal.

Referring back to FIG. 3, in an embodiment, the low frequency sub-bandsignals are processed differently than the medium frequency sub-bandsignals. The low-frequency portion of the input audio signal typicallycorresponds to the rhythm of the music and is also typically dominatedby various types of percussion instruments and/or very low frequencyvocals (e.g. bass vocals). As with the high frequencies, the system andmethod processes the low frequency sub-band signals to generate hapticevents that are consistent with the rhythm and do produce excessivealiasing artifacts. It is common that the drum beats in the music arewithin a certain frequency range within the low frequency sub-bandspectrum. Thus, in an embodiment, the system considers a narrow range offrequencies in the low-frequency sub-band to identify the beats.

In an embodiment, the system identifies this specific range offrequencies by first performing a spectral decomposition analysis (block324) of the low-frequency sub-band signal of the original input signalusing a much longer time frame window as compared to that in block 312.In an embodiment, the time frame window is 1/32 second or 31 ms,although other durations are contemplated and not limited to 31 ms. Thetime frame window provides significantly more resolution in thelow-frequency range than the spectral decomposition computed at block312 to evaluate the spectral rolloff of the signal. Once the system andmethod calculates the higher resolution energy distribution (block 324),the system calculates a power spectrum of the signal. This is performedby block 326, in which the system sums the energy distribution from thespectral decomposition over the designated time window. It should benoted that although the input signal is shown to undergo two differentspectral decomposition analyses (blocks 312 and 324 in FIG. 3), thespectral decomposition of the low frequency sub-band signal mayalternatively be done in block 312, whereby the results are utilized byblock 326 in computing the power spectrum of the low frequency sub-bandsignal.

The system and method utilizes the power spectrum calculations (block326) on the low frequency sub-band signal to sort the frequencies basedon power level (block 328). It is common that several frequencies maycorrespond to the same peak in the power spectrum, whereby the redundantfrequencies would be eliminated to allow more efficient sorting of thefrequency peaks.

FIG. 7 illustrates a frequency-power graph (i.e. power spectrum) used tosegment the low-frequency sub-band signal in accordance with anembodiment. The power spectrum represents the amount of energy presentin the input signal in a set number of frequency bins. This informationis used by the system to sort the frequency into bins of total power.For example, a bin of total power between 2.1 and 2.8 (×10⁴) has thefrequency peaks of 640 Hz, 672 Hz, 416 Hz, 320 Hz and 608 Hz, ranked indescending total power.

To eliminate these redundant frequencies as well as to eliminate otherpeaks that may carry the exact same temporal distribution of energy orpower, such as the same beat, a cross-correlation matrix between thetemporal signals associated with each frequency bin is computed by thesystem, which is discussed in more detail below. In an embodiment, thecorrelation matrix will have an approximate high value at location (i,j)if the time signal at frequency bin fi and at fj are positivelycorrelated. In accordance with an embodiment, all the frequency bins areclipped that have a correlation coefficient higher than 0.5 with a binthat has a higher associated power. In other words, the system willretain the highest energy signal and not use the lower energy signalsthat are above the clipped correlation coefficient. It should be notedthat the correlation coefficient is not limited to 0.5 and values otherthan 0.5 are contemplated. For those remaining frequencies, thealgorithm utilized in block 324 uses the optimizer and segmenter (blocks330, 332) with a maximum alias target of 15%, although other targetpercentages are contemplated

In an embodiment, the system computes correlation coefficients betweenall successive frequency bins in the low frequency band. Audio segmentscorresponding to periodic snare drum beats, hand claps, etc. are usuallyhigh bandwidth events and are most easily identified by searching forthe maximum correlation coefficients. The frequency band with thehighest correlation coefficient to the next frequency is selected by thesystem for further processing in the low-pass detection algorithm. Thecorrelation coefficients of two random variables x and y is given by:

$\begin{matrix}{{{cor}\left( {x,y} \right)} = {{E\left( {x,y} \right)} - \frac{{E(x)}{E(y)}}{\sqrt{\sigma_{x}^{2}\sigma_{y}^{2}}}}} & (1)\end{matrix}$

After the high-, medium- and low-frequency signals have been clipped andsegmented, as described above, the system and method will generate alist of candidate haptic events for each of the sub-band signals. Inparticular, as shown in FIG. 3, the segmented high frequency sub-bandsignals are passed from the high frequency Segment block 322 to thepriority clip block 334. In addition, the segmented medium frequencysub-band signals are passed from the block 318 to the priority clipsummation block 334. Further, the segmented low frequency sub-bandsignals are passed from

It is possible for the system and method to simply output the hapticevents directly without passing them through the priority clip block334, however doing so would possibly yield muddled or blurred hapticsensations by the actuator in the end-device. This would be due toseveral haptic events overlapping in time. To overcome this, the systemutilizes the priority clip block 334 to prioritize the candidate hapticevents from each of the sub-band signals.

In particular, the priority clip block 334 may prevent more than onehaptic event, from same or different frequency sub-bands, to be outputby the actuator if they fall within a specified time period of oneanother. This also prevents overlapping sharp and strong events fromcanceling one another out. For instance, a sharp event (see below), suchas a braking pulse, may terminate a strong event prematurely if both areto be output by the actuator at the same or substantially the same time.

In accordance with an embodiment, any priority of low-, medium- andhigh-frequency haptic events may be output by the priority clip block334 regardless of their overlap. In an embodiment, a sub-band offrequencies could be assigned priority when two haptic events fromdifferent sub-bands are detected to overlap one another. This prioritycould be assigned based on the particular genre of music; the tempo ofthe song; the resolution of the actuator; and/or the amount ofinformation in the input audio signal (e.g. lossy vs. lossless).

As shown in FIG. 3, the priority clip block 334 outputs the prioritizedhaptic events to the effect mapping block 336. In an embodiment, theeffect mapping block receives the prioritized haptic events and assignshaptic effects to these discrete events. In an embodiment, the systemutilizes two basic haptic effect types: periodic andmagnitude-dependent. Periodic effects allow the period or speed ofvibration to be explicitly controlled independent of magnitude. Periodiceffects accurately produce vibration frequencies up to about 30 Hz,depending on the device. Magnitude-dependent effects vibrate at amagnitude- and device-dependent rate.

These two effect types are further characterized with three actuationstyles or effects: strong, smooth and sharp. Each style has a differentcontrol mechanism, resulting in a slightly different sensation to theuser. Strong effects are the effects which feel strongest to the user.Smooth effects have the characteristics wherein the strength of theeffect is diminished to achieve higher frequencies for periodic effects.For the magnitude-dependent effects, the effect strength does notdiminish. Sharp effects achieve the highest frequencies for periodiceffects without diminishing strength, although strength diminishessignificantly for magnitude-dependent effects.

Each effect includes parameters which are adjustable or able to be setby the system or by a user. Such parameters for periodic haptic effectsinclude, but are not limited to, magnitude, period/frequency, duration,attack time, attack level, fade time, fade level and envelope.Parameters for magnitude-dependent haptic effects include, but are notlimited to magnitude, duration and envelope. The described hapticeffects and assignments shown above are illustrative only, and it shouldbe recognized that a multitude of haptic effects and assignments may beused. The generated effects also have an optional magnitudespecification which is usually taken as the maximum value of the signal(normalized to 0-10000) over the segment.

FIG. 8 illustrates an example time-symbol representation of a sequenceof haptic events for a musical piece associated with the input audiosignal discussed above. As shown in FIG. 8, the time-symbolrepresentation 800 includes a time-frequency graph of the input audiosignal 802. In addition, the representation 800 includes the lowfrequency sub-band, designated as Bass 804; the high frequency sub-band,designated as High Pass 806; and two medium frequency sub-bands,designated as Vocal 808 and Mid Accent 810.

As shown in FIG. 8, the system maps the haptic events in the eachsub-band such that only one haptic event occurs at a time and isseparated from the neighboring haptic effects by a designated timeduration. In an embodiment, the system will allow more than one hapticevent to occur at a time where the haptic effect profile for each eventis not similar to one another. For example, as shown in FIG. 8, thesystem will allow strong magnitude dependent effects 808A, 808B andshort periodic effects 804A, 806A to be overlapped considering theywould be effectively felt by the user as two separate events. In theexample representation shown in FIG. 8, the system is configured to givepriority to the low-frequency haptic events over the high-frequencyhaptic events while the medium-frequency events are allowed to overlapwith the high and low frequency events. It should be noted that thesystem is configurable by the user, the end device, or by the inputaudio signal itself, to give priority and overlapping rights to any orall of the frequency sub-bands, and is not limited to that shown in FIG.8.

The above discusses one or more embodiments in which the system is ableto automatically receive, identify and produce haptic events whichcorrespond with the sampled audio signal and are output in a pleasantmanner to the user. The system is also able to receive and processrepresentationally structured encoded music files including, but notlimited to MIDI files, to produce haptic events which correspond withthe encoded music files. It should be noted that although therepresentationally structured files are described herein as music files,the representationally structured files may be files having soundeffects, or other events associated with audio.

FIG. 9 is a time-note representation of a series of MIDI events makingup a musical piece in accordance with an embodiment. The MIDI fileformat may include 16 channels of simultaneous instruments, whereby eachchannel is capable of having events up to 127 unique pitches (calledkeys) that can be played. In addition, the MIDI file format includes achannel reserved for percussion instruments which are generallypitchless. Percussion instruments are distributed across the range ofkeys in percussion channel.

FIG. 10 illustrates a time-instrument-note representation of a series ofMIDI events making up a musical piece in accordance with an embodiment.In a MIDI music file, every note of every instrument is an event thatmay be designated by the system to be a haptic event. However,considering the physical and performance limitations on actuators, thesystem analyzes and processes the MIDI file to produce discrete hapticevents which produce a pleasurable haptic experience to the user.

FIGS. 11A, 11B, and 11C together illustrate a process flow diagram usedby the system to automatically process MIDI files and produce discretehaptic events in the end-player device. In general, the system analyzesthe MIDI data and extracts a melody and/or percussion event sequencefrom the structured representation. The system then generates a scorefor each channel corresponding to each instrument, whereby the score ofa non-percussive channel is related to the variability of notes in thatchannel. This has been found empirically to be effective at selectingthe melody from a set of otherwise unknown input channels. Forpercussive instruments, the scoring strategy relies on a prioriknowledge of the dominance of various percussive instruments. Forexample, the bass drum is most likely to be the dominant percussivechannel, and so the notes associated with the bass drum in thepercussive channel generally receives a higher score. In addition toscoring the input channels from a MIDI sequence, the system and methodperforms one or more clipping operations on the events to allow discretehaptic events to be produced in the end-device. In an embodiment, thesystem clips one or more notes to a desired duration and processes thechannels to remove overlapping notes, such as chords. In an embodiment,the system is configurable based on a number of parameters which may bemanipulated to control the relative priority of one or more channelsover other channels (e.g. percussion vs. melody). As shown in FIG. 11A,selected ones, some, or all channels of the MIDI sequence are receivedin the system (1102). The sequence may be imported into the memory inthe end device, a server in communication with the end device, and/orother intermediate component, computer or processor. In an embodiment,information from the imported MIDI file which is not actually used toproduce the haptic events is actually deleted from memory. In anembodiment, information not actually used to produce the haptic eventsmay be retained by the system to allow reconfiguration or fine tuning ofthe haptic events by a developer or the end user.

In an embodiment, the system executes various pre-processing proceduresto the file after it is received. In an embodiment, the system executespre-note identification and next-note identification techniques on theevents by analyzing the timeline of the events (block 1104 in FIG. 11A).At block 1104, in one embodiment, each channel is processed to set uplinks from an event to the previous event in the same channel. Eachchannel is also processed to set up links from an event to the nextevent in the same channel. In an embodiment, the system analyzes thetimeline of the entire structured audio representation file at one time.In another embodiment, the system analyzes portions of the timeline ofthe audio representation file at a time. This allows the system toquickly process large audio files having a long timeline (e.g. soundeffects in a movie).

As shown in FIG. 11A, the system then identifies melodic and percussiveevents of interest, as shown at block 1106 by identifying the channelswhere melody and percussive events occur. Upon identifying the melodicand percussive events, the system is able to effectively utilize theidentified events to score the melodic events (block 1116) and thepercussive events (block 1132) in FIG. 11B.

As shown in FIG. 11, the system optionally processes each channel toremove chords, in an embodiment (1108). In an embodiment, the systemidentifies chords from the MIDI file as those events that start within acertain duration of each other on the same channel and are onnon-percussive instrument channels. In an embodiment, this duration isset at 15 ms, although other time durations are contemplated. In anembodiment, once the system identifies chords in the MIDI eventchannels, the system retains only the events having the highest pitchand discards the other events which make up the chord from the timeline.In another embodiment, the system eliminates the highest pitch eventsand retains the lower or lowest pitch events. As will be discussed inmore detail below, removal of chords from the timeline reduces the scoregiven to a channel that has many chords, thereby aiding the system inidentifying melodies in the timeline.

At 1110, the system identifies channel pairs that have identical ornearly identical notes at the same or substantially same time. This isoften the case when two or more instruments are playing in harmony (e.g.two guitars simultaneously playing a same riff). For each channel, atime sampled vector of on-times is generated, wherein the on-times arethe points where events occur. The system accomplishes this by examiningeach channel's events over the timeline and setting a value 1 for thetime interval during which an event is occurring. Otherwise a value of 0is set in the vector. This generates a set of vectors of length, n:

$\begin{matrix}{n = {{floor}\left( \frac{T}{t_{s}} \right)}} & (2)\end{matrix}$where T is the total duration of the MIDI input file and t_(s) is thesampling interval.

To identify channels that have notes that overlap, a correlation iscalculated for each of the channels:

$\begin{matrix}{{{cor}\left( {v_{i},v_{j}} \right)} = {\frac{{cov}\left( {v_{i},v_{j}} \right)}{\sigma_{i}\sigma_{j}} = \frac{\left\langle {v_{i}v_{j}} \right\rangle - {\left\langle v_{i} \right\rangle\left\langle v_{j} \right\rangle}}{\sigma_{i}\sigma_{j}}}} & (3)\end{matrix}$where v_(i), v_(j) are time sampled vectors, and σ_(i) is the standarddeviation of vector v_(i) treated as a time series. If the correlationof two or more channels exceeds a correlation threshold value, then aportion or an entire channel may be eliminated from the timeline.

For example, referring back to FIG. 9, the channels 902 and 904 areshown between lines 900 and 908 to be substantially identical. Upon thesystem performing the above calculations on channels 902 and 904, thesystem will eliminate one of the two channels considering that they areplaying the same melody at the same time. Which of the two channelswhich will be eliminated may be dependent on parameters set by the userand/or the system.

As shown in FIG. 11A, the system restricts the events to desired lengthby setting a maximum and minimum length by using a clipping process(1112). The system clips the events which are shorter than a specifiedminimum duration to be at least as long as the minimum duration.Additionally, events longer than a specified maximum duration arechanged or clipped to be no longer than the maximum duration. Inaddition, two or more events that have a spacing duration between themto be less than a pre-specified minimum are changed to have at least theminimum spacing duration. This may be done by shortening one or both ofthe events in the sequence to produce the minimum spacing therebetween.

Turning now to FIG. 11B, once the system has completed importing andpre-processing each channel, the system initiates scoring of eachchannel in the received file (1116). It should be noted, in anembodiment, that the system is able to begin the scoring process as theimporting/pre-processing of the received file is being executed. In anembodiment, the system begins the scoring process after theimporting/pre-processing of the file is performed.

In an embodiment, the system scores the channels using two sets ofrules. The first rule set is designed to give a higher score to thechannels that have some variability as those channels are likely to becarrying the melody. The second rule set provides a ranking topercussive channels in terms of their traditional importance in definingthe rhythm in the song.

Scoring is accomplished by examining all of the events in the timeline.Each event is passed through a scoring filter that assigns a score tothe individual event. Once all events have been processed, a second loopthrough the timeline derives the score for all events in each channel,yielding a total score per channel. In an embodiment, this is done bysimply accumulating the scores of the events. In another embodiment,this is done using an appropriate algorithm. As shown in FIG. 11B, thesystem scores the melodic and percussive events separately in anembodiment, although the scoring may be done simultaneously or one afteranother. In an embodiment, the system is capable of scoring the melodicand percussive events all together, whereby information determined forone type of event (i.e. melodic or percussive) may be used to analyze orevaluate the other type of event (i.e. percussive or melodic).

For melodic events in the timeline, the system utilizes a subset ofrules in scoring the events, as shown at 1116 in FIG. 11B. In anembodiment, each of the subset rules are executed by the systemsimultaneously. In an embodiment, one or more of the subset rules areexecuted by the system in a sequence.

As shown in FIG. 11B, the system scores the pitch change between eventsin accordance with block 1118 of an embodiment. As in block 1118, thesystem calculates the absolute value of the difference between the pitchof the current event and the pitch of one or more previous events,whereby the pitches each have a determined value. The system is able toassign a value to the pitch from the channel data inherently encoded inthe audio representation file. In an embodiment, the difference isoutput as the pitch score. In an embodiment, the difference value isscaled by a predetermined factor (e.g. 500) to get the pitch score.

As shown in FIG. 11B, the system scores the start time between events inaccordance with block 1120 of an embodiment. The system in block 1120analyzes the duration of the events to determine whether a rhythm isbeing played in the channel. In an embodiment, in block 1120 thedifference in start times is calculated between an event and theimmediately preceding event. In an embodiment, in block 1120 thedifference in start times is calculated between a preceding event and anevent previous to the preceding event. In an embodiment, the systemweights the differences before outputting a start time score. In anembodiment, the weighted amount is of a factor of 5. It is contemplated,however, that the weighted value can be a factor other than 5. Dependingon other rhythms in the file or the genre of the song, the system mayscore the durations higher or lower such that the system outputsappropriately resolved haptic events.

As shown in FIG. 11B, the system scores the magnitude or intensity ofthe event in accordance with block 1122 of an embodiment. Block 1122designates a score equal based upon a function of the magnitude of theevent. The system is able to determine the magnitude of each event fromthe channel data inherently encoded in the structured representationfile.

As shown in FIG. 11B, the system scores the duration of an event inaccordance with block 1124 in an embodiment. Block 1124 designates ascore based upon a function of the duration of the event. In anembodiment, the system assigns a higher score for events which have alonger duration than events which have a shorter duration. In anotherembodiment, the system assigns a lower score for events which have alonger duration than events which have a shorter duration

As shown in FIG. 11B, the system scores the change in duration of anevent in accordance with block 1126 of an embodiment. In particular, thesystem designates a score based upon a change in duration between thecurrent event and a previous event in block 1126.

As shown in FIG. 11B, the system scores the change in duration of anevent in accordance with block 1128 of an embodiment. In particular, thesystem designates a score based upon a duration of silence before eachnote within the event in block 1128. For example, if the systemidentifies an event that occurs after a long duration of silence in aparticular channel, the system may assign a high score to the event suchthat it will most likely be output as a haptic event. An example of thiswould be a cymbal crashing at the end of a drum roll.

In an embodiment, as illustrated by block 1130, melodic events areoptionally scored by the system in relation to their entropy. In theprocess of evaluating the rules, the system may utilize a relationshipbetween the scores assigned to a channel and the acoustic entropyassociated with that channel. To estimate the entropy of each melodicchannel, a distribution of notes is constructed by the system. Thetraditional 12 tone scale is used to define equivalence classes {p(k),k=1 . . . 12} of note pitches. Each event is classified according towhich tone in the 12 tone scale is associated with the event's key. Adistribution is built by scaling each event contribution using aperceptual accent rule, whereby weighting, w, is determined by equation4:

$\begin{matrix}{w = \left( {1 - e^{\frac{d}{\tau}}} \right)^{\alpha}} & (4)\end{matrix}$where variable d is the duration (in seconds) of the silence between thecurrent event and the previous event. Variable τ is the saturation restlength (taken to be 0.5 s) and α is the minimum discriminable duration(taken to be 2 s). It should be noted that other values for saturationrest length and minimum discriminable duration are contemplated and arenot limited to the values mentioned herein.

The entropy of this distribution is calculated using the formula inequation 5:

$\begin{matrix}{e = {- {\sum\limits_{k = 1}^{12}{{p(k)}{\log\left( {p(k)} \right)}}}}} & (5)\end{matrix}$where p(k) are the classes of tonal pitches from 1 to 12 (for a 12 tonescale).

In addition to scoring the melodic events, the system scores percussiveevents as shown by block 1132 in FIG. 11B. In an embodiment, the systemutilizes two rules in scoring the percussive events. In particular, thesystem scores the duration of the silence before each percussive note.The duration of silence is considered to be milliseconds, and the scoreis weighted in an embodiment. In an embodiment, the scored silence valueis divided by a value of 4, although other values are contemplated.

As shown in FIG. 11B, the system assigns a value to each percussiveinstrument depending on the type of percussion instrument. In anembodiment, a weight value of 1 to 5 is assigned by the system for eachpercussion instrument such that the more dominant instruments receive ahigher value. For example, events attributed to a bass drum instrumentare given a value of 5 whereas events attributed at a high-hat symbol isgiven a value of 1. In an embodiment, the value is weighted by a factor(e.g. 100) in producing the per event score. The total event score forthe percussive events is based upon a subset of these rules.

In an embodiment, the scoring multipliers for both percussive andmelodic rules are weighted by the system to emphasize melody instrumentsover percussive ones when absolute rankings of channels are generated.This processing occurs at Block 1138 where channel scores are generated.The weightings may be based on the genre of music, type of audio file(e.g. music vs. sound effects of video), user preference, type of enddevice, etc.

Turning now to FIG. 11C, following the generation of scores per channel(block 1138), the system is able to sort the channels based on scorevalues, as shown by block 1142. In an embodiment, the system sorts themelodic channels and percussive channels separately, although the systemis capable of sorting both types of channels together. In an embodiment,the scored channels are sorted in descending order, whereby the channelswith the highest scores are ranked as “high”. In an embodiment, thescored channels are sorted in ascending order. In an embodiment, thesystem sorts channels which are within a desired range of scores or onlychooses channels with desired scores. In an embodiment, the system ranksthe scores highest to lowest in which the highest-ranked events will beoutput as a haptic event and the lowest-ranked events will not be outputas a haptic event.

Upon the system ranking or choosing the channels based on score, thesystem is able to determine which channels will provide the events uponwhich the haptic effects will be based. In an embodiment, the systemgenerates haptic effects at Block 1144 using the following pseudo-code:

While channels remain For each empty duration > 400ms in the Vibechannel Fill the empty duration, with a 100ms cushion at the beginningand end of the gap with the highest scoring channel in that interval.end

In other words, the system automatically maps the highest ranked hapticevents from the beginning to the end of the song. Thereafter, the system“fills in the blanks” and again maps the next highest ranked hapticevents which are able to be placed within the empty or non-haptic eventportions of the song. This process is repeated until the maximum numberof allowed haptic events are mapped in the song, taking intoconsideration of actuator resolution, duration cushions, userpreference, haptic effect styles and type of song. It should be notedthat the above is only an example pseudo code and the system may utilizedifferent duration cushions as well as utilize the lowest scoringchannel or other criteria

As the events are assigned to be a haptic event, the system clips thehaptic event to have a duration within a desired range. In anembodiment, the clipping range is between 200 ms and 300 ms, althoughgreater or lesser durations are contemplated and may depend on theproperties of the haptic actuator. In addition, the start time of theevent can be offset by a desired amount to ensure perceptual couplingbetween audio and haptic events on different types of actuators. In anembodiment, the intensity of the haptic event may be adjusted in thesystem. For example, the minimum duration may be set to a lower valueand the cushioning time may be increased.

As shown in FIG. 11C, the system removes percussive overlap in anembodiment. The system optionally independently constructs a melodic andpercussive channel using the ‘fill in the blanks’ algorithm, and thenmerges together them to produce the final mapped haptic events. This islikely to be most effective when only “strong” effects are being used,as overlapping sharp effects can yield unpredictable vibe behavior.Alternatively it is possible for the system to attenuate the magnitudeof haptic events that have overlapping percussive events, whereby theattenuated haptic events are then output at maximum magnitude. Thisprovides the end device with the characteristic of preserving the melodyyet displaying perceptual accentuation for the rhythm.

In an embodiment, the system is able to add Custom Fades (Block 1150) atcertain points in the timeline of the structured representation signal.A designer may choose to replace a note of long duration with a shortereffect that fades out (e.g. 500 ms). Also, the end of a phrase ormelodic line can be made more interesting by adding a similar fadeeffect

In an embodiment, the system looks for events with a long (more thanabout 500 milliseconds) duration as they are added to the timeline inaccordance with the above rules. If there is also a large time gap(about 1000 milliseconds) between the particular event and the nextevent, the system may automatically fade in or out the particular event.To implement this approach, the system identifies and builds a list ofsuch haptic events which have a haptic effect characteristic or profilethat fades in and/or out. After the entire timeline has beenconstructed, the system replaces the existing haptic events with thefaded haptic events from the list. The Fade effect may be implemented asa periodic or magnitude dependent effect that decays for its entireduration.

The methods for converting digital sampled audio and/or structuredrepresentation files described above allow for the automatic conversionof notes to haptic events. Once converted, these haptic event sequencesare able to be stored and be re-distributed to other end-devices by anappropriate manner. For example, the haptic events sequences may bestored as an output file in a server that is in communication with oneor more clients over a network. Upon establishing a communication linkwith the client, the server may deliver the output file electronicallyto be played in the client. Likewise, the haptic sequences can be usedin a variety of settings known in the art. For example, to notify a userof a phone call or an event such as an appointment, alarm, incomingmessage such as a weather report or text message and the like. In anembodiment, the structured representation files may be applied to akaraoke song in which the end device (e.g. karaoke microphone) outputshaptic effects after automatic conversion of the file to cue the singerof the vocals. In an embodiment, the end device is able to automaticallyconvert, map and output haptic event sequences for sound effects orother audio in a video, video game, music video or movie file which isdownloadable onto the end device.

While embodiments and applications of this invention have been shown anddescribed, it would be apparent to those skilled in the art having thebenefit of this disclosure that many more modifications than mentionedabove are possible without departing from the inventive concepts herein.The invention, therefore, is not to be restricted except in the spiritof the appended claims.

We claim:
 1. A method for automatically generating haptic effectscomprising: receiving a representationally structured file comprising aplurality of designated events, wherein the plurality of designatedevents are distributed within two or more channels; comparing the eventsbetween the two or more channels along a common timeline; choosing oneor more events in one of the two or more channels when a correlation ofthe two or more channels is not within a threshold correlation betweenthe two or more channels; assigning a score for the chosen one or moreevents in two or more channels of the representationally structuredfile; generating a plurality of haptic events by assigning a hapticeffect to each of the designated events satisfying a score criteria; andoutputting the haptic events to an actuator, wherein each outputtedhaptic event is associated with a corresponding event in therepresentationally structured file.
 2. The method according to claim 1,wherein adjacent outputted haptic events are temporally spaced apart bya minimum time duration.
 3. The method according to claim 1, furthercomprising: calculating a derived score based on the score for theplurality of designated events in the one or more channels; andselecting the one or more channels based on the derived score.
 4. Themethod according to claim 1, wherein the events in therepresentationally structured file are notes in a musical piece.
 5. Themethod according to claim 1, further comprising: determining whether aparticular event begins within a threshold time of an adjacent event ina same channel; and choosing the event having a higher pitch when theparticular and adjacent events are within the threshold time, whereinthe chosen event is scored.
 6. The method according to claim 1, whereinthe event score is calculated based on a difference between a frequencyof a current event and a frequency of a previous event, or a differencein start times between a current event and a previous event, or upon amagnitude value of the event, or a duration of the event, or a change induration between a particular event and an adjacent event.
 7. The methodaccording to claim 1, wherein the adjacent event is previous to theparticular event in a timeline.
 8. The method according to claim 1,further comprising adjusting a duration of the haptic event to begreater than a minimum time duration and less than a maximum timeduration.
 9. The method according to claim 1, wherein the event score isweighted based on an instrument playing the event in the channel. 10.The method according to claim 1, wherein the event score for each eventwithin a non-percussive channel is calculated based upon a differencebetween a pitch of a current event and a frequency of a previous event.11. The method according to claim 1, wherein the event score for eachevent within a non-percussive channel is calculated based upon adifference between a frequency of a current event and a frequency of aprevious event.
 12. A non-transitory computer-readable medium havinginstructions stored thereon that, when executed by a processor, causethe processor to automatically generate haptic effects, the automaticgenerating comprising: receiving a representationally structured filecomprising a plurality of designated events, wherein the plurality ofdesignated events are distributed within two or more channels; comparingthe events between the two or more channels along a common timeline;choosing one or more events in one of the two or more channels when acorrelation of the two or more channels is not within a thresholdcorrelation between the two or more channels; assigning a score for thechosen one or more events in two or more channels of therepresentationally structured file; generating a plurality of hapticevents by assigning a haptic effect to each of the designated eventssatisfying a score criteria; and outputting the haptic events to anactuator, wherein each outputted haptic event is associated with acorresponding event in the representationally structured file.
 13. Thenon-transitory computer-readable medium according to claim 12, whereinadjacent outputted haptic events are temporally spaced apart by aminimum time duration.
 14. The non-transitory computer-readable mediumaccording to claim 12, the automatic converting further comprising:calculating a derived score based on the score for the plurality ofdesignated events in the one or more channels; and selecting the one ormore channels based on the derived score.
 15. The non-transitorycomputer-readable medium according to claim 12, wherein the events inthe representationally structured file are notes in a musical piece. 16.The non-transitory computer-readable medium according to claim 12, theautomatic converting further comprising: determining whether aparticular event begins within a threshold time of an adjacent event ina same channel; and choosing the event having a higher pitch when theparticular and adjacent events are within the threshold time, whereinthe chosen event is scored.
 17. The non-transitory computer-readablemedium according to claim 12, wherein the event score is calculatedbased on a difference between a frequency of a current event and afrequency of a previous event, or a difference in start times between acurrent event and a previous event, or upon a magnitude value of theevent, or a duration of the event, or a change in duration between aparticular event and an adjacent event.
 18. The non-transitorycomputer-readable medium according to claim 12, wherein the adjacentevent is previous to the particular event in a timeline.
 19. Thenon-transitory computer-readable medium according to claim 12, theautomatic converting further comprising adjusting a duration of thehaptic event to be greater than a minimum time duration and less than amaximum time duration.
 20. The non-transitory computer-readable mediumaccording to claim 12, wherein the event score is weighted based on aninstrument playing the event in the channel.
 21. The non-transitorycomputer-readable medium according to claim 12, wherein the event scorefor each event within a non-percussive channel is calculated based upona difference between a pitch of a current event and a frequency of aprevious event.
 22. The non-transitory computer-readable mediumaccording to claim 12, wherein the event score for each event within anon-percussive channel is calculated based upon a difference between afrequency of a current event and a frequency of a previous event.
 23. Anapparatus for automatically generating haptic effects comprising: acircuit configured to receive a representationally structured filecomprising a plurality of designated events, wherein the plurality ofdesignated events are distributed within two or more channels; a circuitconfigured to compare the events between the two or more channels alonga common timeline; a circuit configured to choose one or more events inone of the two or more channels when a correlation of the two or morechannels is not within a threshold correlation between the two or morechannels; a circuit configured to assign a score for the chosen one ormore events in two or more channels of the representationally structuredfile; a circuit configured to generate a plurality of haptic events byassigning a haptic effect to each of the designated events satisfying ascore criteria; and a circuit configured to output the haptic events toan actuator, wherein each outputted haptic event is associated with acorresponding event in the representationally structured file.
 24. Theapparatus according to claim 23, wherein adjacent outputted hapticevents are temporally spaced apart by a minimum time duration.
 25. Theapparatus according to claim 23, further comprising: a circuitconfigured to calculate a derived score based on the score for theplurality of designated events in the one or more channels; and acircuit selecting the one or more channels based on the derived score.26. The apparatus according to claim 23, wherein the events in therepresentationally structured file are notes in a musical piece.
 27. Theapparatus according to claim 23, further comprising: a circuitconfigured to determine whether a particular event begins within athreshold time of an adjacent event in a same channel; and a circuitconfigured to choose the event having a higher pitch when the particularand adjacent events are within the threshold time, wherein the chosenevent is scored.
 28. The apparatus according to claim 23, wherein theevent score is calculated based on a difference between a frequency of acurrent event and a frequency of a previous event, or a difference instart times between a current event and a previous event, or upon amagnitude value of the event, or a duration of the event, or a change induration between a particular event and an adjacent event.
 29. Theapparatus according to claim 23, wherein the adjacent event is previousto the particular event in a timeline.
 30. The apparatus according toclaim 23, further comprising a circuit configured to adjust a durationof the haptic event to be greater than a minimum time duration and lessthan a maximum time duration.
 31. The apparatus according to claim 23,wherein the event score is weighted based on an instrument playing theevent in the channel.
 32. The apparatus according to claim 23, whereinthe event score for each event within a non-percussive channel iscalculated based upon a difference between a pitch of a current eventand a frequency of a previous event.
 33. The apparatus according toclaim 23, wherein the event score for each event within a non-percussivechannel is calculated based upon a difference between a frequency of acurrent event and a frequency of a previous event.